﻿@model GameSchool.Models.Person

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
            
    @{
        GameSchool.Models.Person person = (GameSchool.Models.Person)ViewData["CurrentPerson"];
    }

<table style="width: 100%; height: 100%">
<tr>
		<td>
			@Html.LabelFor(model => model.Fullname)
		</td>
		<td>
			@Html.DisplayFor(model => model.Fullname)
			@Html.ValidationMessageFor(model => model.Fullname)
		</td>
	</tr>
	
	<tr>
		<td>
			@Html.LabelFor(model => model.Username)
		</td> 
		<td>
			@Html.DisplayFor(model => model.Username)
			@Html.ValidationMessageFor(model => model.Username)
		</td>
	</tr>

	<tr>
		<td>
			@Html.LabelFor(model => model.Ssn)
		</td>

		<td>
			@Html.DisplayFor(model => model.Ssn)
			@Html.ValidationMessageFor(model => model.Ssn)
		</td>
	</tr>

	<tr>
		<td>
            @Html.DisplayFor(model => model.PhoneNumber)
		</td> 

		<td>
			@Html.DisplayFor(model => model.PhoneNumber)
			@Html.ValidationMessageFor(model => model.PhoneNumber)
		</td>
	</tr>
            
            @if (Model.IsAdmin)
            {
                <tr>
					<td>
						Umsjónarmaður
					</td>
					<td>
						<span class="ui-icon ui-icon-check"></span>
					</td>
                </tr>
            }
           	  	
            @if (Model.IsTeacher)
            {
                <tr>
					<td>
						Kennari
					</td>
					<td>
						<span class="ui-icon ui-icon-check"></span>
					</td>
                </tr>
            }
             
            @if (Model.IsStudent)
            {
				<tr>
					<td>
						Nemandi
					</td>
					<td>
						<span class="ui-icon ui-icon-check"></span>
					</td>
				</tr>
            }
            
	        <tr>
		        <td colspan="2">
			                    @Html.ActionLink("Breyta notanda", "EditPerson/"+Model.PersonId, "Person")
		        </td>
	        </tr>
</table>                     


